package com.jianyun.jyzs.utils;

import android.content.Context;


public class SysConstant2 {
	public static final String pak = "com.blg.buildcloud.";
	/*1) 消息-审批提醒：phoneMyworkflowlist
	2) 应用-流程审批-我的待办：phoneMyworkflowlist
	3) 应用-流程审批-我的已办：phoneworkflowlist
	4) 应用-流程审批-共享任务：phoneshareworkflowlist
	*/
	public static final String http_url_myWorkFlowUrl = "phone/phoneMyworkflowlist.aspx?employeeid={employeeid}";
	public static final String http_url_workFlowUrl = "phone/phoneworkflowlist.aspx?employeeid={employeeid}";
	public static final String http_url_shareWorkFlowUrl = "phone/phoneshareworkflowlist.aspx?employeeid={employeeid}";
	public static final String http_url_http_url_alarmUrl2 = "/EWManager/MsgList.aspx?employeeid={employeeid}&type=2";//主责预警
	public static final String http_url_http_url_alarmUrl1 = "/EWManager/MsgList.aspx?employeeid={employeeid}&type=1";//相关预警
	public static final String http_url_http_url_projectInfo = "pmphone/projectlist.aspx?code=projectinfo&EmployeeID={EmployeeID}";//项目查看
	public static final String http_url_http_url_contract =    "pmphone/projectlist.aspx?code=contract&EmployeeID={EmployeeID}";//总包合同
	public static final String http_url_http_url_subContract = "pmphone/projectlist.aspx?code=subContract&EmployeeID={EmployeeID}";//分包合同
	public static final String http_url_http_url_othContract = "pmphone/projectlist.aspx?code=othContract&EmployeeID={EmployeeID}";//其他合同
	public static final String http_url_http_url_pemtContract ="pmphone/projectlist.aspx?code=pemtContract&EmployeeID={EmployeeID}";//采购合同
	public static final String http_url_http_url_leaseContract="pmphone/projectlist.aspx?code=leaseContract&EmployeeID={EmployeeID}";//租赁合同
	public static final String http_url_http_url_bidMng =      "pmphone/projectlist.aspx?code=bidMng&EmployeeID={EmployeeID}";//投标管理
	public static final String http_url_http_url_tenderMng =   "pmphone/projectlist.aspx?code=tenderMng&EmployeeID={EmployeeID}";//招标管理
	public static final String http_url_getBaiduAddressByLatLng = "http://api.map.baidu.com/geocoder/v2/?ak=key&callback=renderReverse&location=lat,lng&output=json&pois=0";//招标管理
	public static Integer resendPos;//重发消息坐标标示
	//手机像素
	public static int width = 0;  
	public static int height = 0; 
	//外网地址
	public static String netIp = ""; 
	//功能权限
	public static String ENABLE = ""; 
	/**
	 * 获取权限,,参数从0开始,--1表示启用, 0表示禁用
	 * 举例： enable=11001100110011111
		1工单: 启用
		2质量检查单: 启用
		3安全检查单: 禁用
		4日常巡查: 禁用
		5签到: 启用
		6扫一扫: 启用
		7通知公告: 禁用
		8预警消息: 禁用
		9审批提醒: 启用
		10群组消息----群聊: 启用
		11群组消息----专题讨论: 禁用
		12个人消息: 禁用
		13企业白板: 启用
		14扫码上传: 启用
		15扫码讨论: 启用
		16安防平台: 启用
		17CRM: 启用
		18项目查看
		19总包合同
		20分包合同
		21其他合同
		22采购合同
		23租赁合同
		24投标管理
		25招标管理
		26请示汇报
		27工程动态
		备注：enable属性值不止15位，可能还是增加位数
	 * @param index
	 * @return
	 */
	public static boolean getIndexValue(int index,Context context){
		boolean bool = false;
		try {
			if(ENABLE == null || ENABLE.trim().equals("")){
				//ENABLE = PreferrenceUtil.getPreferencesData(context, SysConstant2.LOGIN_ENABLE);
			}
			if(ENABLE != null && !ENABLE.trim().equals("") && (ENABLE.length() <= index || ENABLE.length() >= index)){
				if(Integer.valueOf(ENABLE.substring(index, index+1)).intValue() == 1){
					return true;
				}
				return false;
			}
		} catch (Exception e) {
			return false;
		}
		return bool;
	}
	// 广播action名称
	public static final String act_dataLoop = pak + "dataLoop";// activity应答广播的广播，表示已经显示广播数据
	public static final String act_logined = pak + "logined";// 登录成功
	public static final String act_cancelLogin = pak + "cancelLogin";// 注销登录
	public static final String act_repeatLogin = pak + "repeatLogin";// 重复登录
	public static final String act_startLocation = pak + "startLocation"; // 开启定位
	public static final String act_stopLocation = pak + "stopLocation"; // 停止定位
	public static final String act_receiveMsg = pak + "receiveMsg"; // 通知接受到了聊天信息(单聊,群聊,企业白板)
	public static final String act_workReceiveMsg = pak + "workReceiveMsg"; // 通知接受到了任务聊天信息(工单,质量,安全)
	public static final String act_closeNotification = pak + "closeNotification"; // 关闭通知栏信息
	public static final String act_invalidUser = pak + "invalidUser"; // 无效用户
	public static final String act_emptyChat = pak + "emptyChat"; // 清空聊天消息
	public static final String act_workEmptyChat = pak + "workEmptyChat"; // 清空任务聊天消息
	public static final String act_updateGroupName = pak + "updateGroupName";//修改群名称
	public static final String act_exitGroup = pak + "exitGroup";//退群
	public static final String act_updateNodeName = pak + "updateNodeName";//修改节点名称
	public static final String act_updateNodeExeUser = pak + "updateNodeExeUser";//修改节点执行人员
	public static final String act_deleteNodeName = pak + "deleteNodeName";//删除节点
	public static final String act_deleteOrder = pak + "deleteOrder";//删除工单
	public static final String act_updateOrderEndDate = pak + "updateOrderEndDate";//修改工单完成日期
	public static final String act_updateQualityInspectEndDate = pak + "updateQualityInspectEndDate";//修改质量单完成日期
	public static final String act_updateSafetyInspectEndDate = pak + "updateSafetyInspectEndDate";//修改安全单完成日期
	public static final String act_addOrder = pak + "addOrder";//添加工单
	public static final String act_addOrderNode = pak + "addOrderNode";//添加工单节点
	public static final String act_updateOrderState = pak + "updateOrderState";//修改工单状态
	public static final String act_updateNodeState = pak + "updateNodeState";//修改节点状态

	public static final String act_updateQualityInspectNodeName = pak + "updateQualityNodeName";//修改质量节点名称
	public static final String act_updateQualityInspectNodeExeUser = pak + "updateQualityNodeExeUser";//修改质量节点执行人员
	public static final String act_deleteQualityInspectNodeName = pak + "deleteQualityNodeName";//删除质量节点
	public static final String act_deleteQualityInspect = pak + "deleteQuality";//删除质量
	public static final String act_addQualityInspect = pak + "addQuality";//添加质量
	public static final String act_addQualityInspectNode = pak + "addQualityNode";//添加质量节点
	public static final String act_updateQualityInspectState = pak + "updateQualityState";//修改质量状态
	public static final String act_updateQualityInspectNodeState = pak + "updateQualityNodeState";//修改质量节点状态
	
	public static final String act_updateSafetyInspectNodeName = pak + "updateSafetyNodeName";//修改安全节点名称
	public static final String act_updateSafetyInspectNodeExeUser = pak + "updateSafetyNodeExeUser";//修改安全节点执行人员
	public static final String act_deleteSafetyInspectNodeName = pak + "deleteSafetyNodeName";//删除安全节点
	public static final String act_deleteSafetyInspect = pak + "deleteSafety";//删除安全
	public static final String act_addSafetyInspect = pak + "addSafety";//添加安全
	public static final String act_addSafetyInspectNode = pak + "addSafetyNode";//添加安全节点
	public static final String act_updateSafetyInspectState = pak + "updateSafetyState";//修改安全状态
	public static final String act_updateSafetyInspectNodeState = pak + "updateSafetyNodeState";//修改安全节点状态

	public static final String act_receiveNotice = pak + "receiveNotice";//接收到公告
	public static final String act_receiveNoticeDiscuss = pak + "receiveNoticeDiscuss";//接收到公告评论
	public static final String act_receiveWarnMsg = pak + "receiveWarnMsg";//接收预警数量
	public static final String act_receiveWorkFlowMsg = pak + "receiveWorkFlowMsg";//接收审批流程数量
	public static final String act_receiveDailyPolicyOrder = pak + "receiveDailyPolicyOrder";//接收到日常巡查
	public static final String act_receiveDailyPolicyOrderMsg = pak + "receiveDailyPolicyOrderMsg";//接收到日常巡查
	public static final String act_addDailyPolicyOrder = pak + "addDailyPolicyOrder";//添加日常巡查
	public static final String act_addCommonContact = pak + "addCommonContact"; // 添加到常用联系人
	public static final String act_deleteCommonContact = pak + "deleteCommonContact"; // 删除到常用联系人
//	public static final String act_softClockMsg = pak + "softClockMsg";//广播软时钟
	public static final String act_addCrm = pak + "addCrm";//添加CRM
	public static final String act_updateCrmFunnel = pak + "updateCrmFunnel";//修改漏斗阶段
	public static final String act_reFreshData = pak + "reFreshData";//刷新CRM
	public static final String act_deleteCrm = pak + "deleteCrm";//删除CRM
	public static final String act_funnelCrm = pak + "funnelCrm";//CRM漏斗阶段
	public static final String act_receiveProjectProgress = pak + "receiveProjectProgress";//接收到工程动态
	public static final String act_receiveProjectProgressDel = pak + "receiveProjectProgressDel";//接收到工程动态删除
	public static final String act_addAskReport = pak + "addAskReport";//新的请示汇报
	// 用户权限
	public static final int userPermission_Admin = 1;
	
	//后台接受数据类型
	public static final String dataId = "dataId";//类型ID
	public static final String dataType = "dataType";//类型名称
	public static final String dataType2 = "dataType2";//类型名称2
	public static final int tp_orderMsg = 1;//工单
	public static final int tp_noticeMsg = 2;//通知公告
	public static final int tp_warnMsg = 3;//预警消息
	public static final int tp_groupMsg = 4;//群消息
	public static final int tp_singleMsg = 5;//消息
	public static final int tp_workFlowMsg = 6;//审批消息
	public static final int tp_enterpriseBoard = 7;//企业白板
	public static final int tp_workChatMsg = 8;//任务聊天消息
	public static final int tp_workNodeMsg = 9;//任务节点提交的消息
	public static final int chat_empty = 10;//清空聊天消息
	public static final int chat_updateGroupName = 11;//修改群名称
	public static final int chat_exitGroup = 12;//退出群
	public static final int tp_updateNodeName = 13;//修改节点名称
	public static final int tp_updateNodeExeUser = 14;//修改节点名称
	public static final int tp_deleteOrder = 15;//删除工单
	public static final int tp_addOrder = 16;//添加工单
	public static final int tp_updateOrderState = 17;//修改工单状态
	public static final int tp_updateNodeState = 18;//修改节点状态
	public static final int tp_receiveNotice = 19;//得到公告
	public static final int tp_receiveDailyPolicyOrder = 20;//得到日常巡查
	public static final int tp_receiveDailyPolicyOrderMsg = 21;//得到日常巡查
	public static final int tp_addOrderNode = 22;//添加工单节点
	public static final int tp_addCommonContact = 23;//添加常用联系人
	public static final int tp_deleteCommonContact = 24;//删除常用联系人
	
	public static final int tp_deleteQualityInspect = 25;//删除质量
	public static final int tp_addQualityInspect = 26;//添加质量
	public static final int tp_updateQualityInspectState = 27;//修改质量状态
	public static final int tp_updateQualityInspectNodeName = 28;//修改质量节点名称
	public static final int tp_updateQualityInspectNodeExeUser = 29;//修改质量节点名称
	public static final int tp_updateQualityInspectNodeState = 30;//修改质量节点状态
	public static final int tp_addQualityInspectNode = 31;//添加质量节点

	public static final int tp_qualityInspect = 32;//质量
	
	public static final int tp_deleteSafetyInspect = 33;//删除安全
	public static final int tp_addSafetyInspect = 34;//添加安全
	public static final int tp_updateSafetyInspectState = 35;//修改安全状态
	public static final int tp_updateSafetyInspectNodeName = 36;//修改安全节点名称
	public static final int tp_updateSafetyInspectNodeExeUser = 37;//修改安全节点名称
	public static final int tp_updateSafetyInspectNodeState = 38;//修改安全节点状态
	public static final int tp_addSafetyInspectNode = 39;//添加安全节点
	
	public static final int tp_safetyInspect = 40;//安全
//	public static final int tp_softClockMsg = 41;//softClockMsg

	public static final int tp_addCrm = 42;//添加CRM
	public static final int tp_updateCrmFunnel = 43;//修改CRM漏斗阶段
	public static final int tp_updateOrderEndDate = 44;//修改工单完成日期
	public static final int tp_reFreshData = 45;//刷新数据列表
	public static final int tp_updateQualityInspectEndDate = 46;//修改质量单完成日期
	public static final int tp_updateSafetyInspectEndDate = 47;//修改安全单完成日期
	public static final int tp_crmMsg = 48;//CRM消息
	public static final int tp_deleteCrm = 49;//删除CRM
	public static final int tp_funnelCrm = 50;//crm漏斗阶段
	public static final int tp_projectProgressMsg = 51;//工程动态消息
	public static final int tp_projectProgressCreate = 52;//工程动态创建
	public static final int tp_projectProgressDel = 53;//工程动态删除
	
	public static final int tp_askReportMsg = 54;//请示汇报消息
	public static final int tp_addAskReport = 55;//新的请示汇报

	// 消息或广播数据中的参数的key值
	public static final String msg_key_parcelable = "parcelable";
	public static final String msg_key_bundel = "bundel";
	public static final String msg_key_int1 = "int1";
	public static final String msg_key_int2 = "int2";
	public static final String msg_key_int3 = "int3";
	public static final String msg_key_intGroup1 = "intGroup1";
	public static final String msg_key_intGroup2 = "intGroup2";
	public static final String msg_key_long1 = "long1";
	public static final String msg_key_long2 = "long2";
	public static final String msg_key_long3 = "long3";
	public static final String msg_key_double1 = "double1";
	public static final String msg_key_double2 = "double2";
	public static final String msg_key_string1 = "string1";
	public static final String msg_key_string2 = "string2";
	public static final String msg_key_string3 = "string3";
	public static final String msg_key_string4 = "string4";
	public static final String msg_key_string5 = "string5";
	public static final String msg_key_boolean1 = "boolean1";
	public static final String BUNDLE_MESSAGE = "bundleMessage"; // 广播传递的bean对象

	public static final int NO = 0;// 否
	public static final int YES = 1;// 是
	
	//工单状态
	public static final String[] ORDERSTATE_1 = {"-1","全部"};// 0 未完成 
	public static final String[] ORDERSTATE0 = {"0","执行中"};// 0 未完成 
	public static final String[] ORDERSTATE1 = {"1","完成"};//  完成 
	public static final String[] ORDERSTATE3 = {"3","暂停"};// 暂停
	public static final String[] ORDERSTATE4 = {"4","取消"};//  取消
	public static final String[] ORDERSTATE5 = {"5","合格"};//  合格
	public static final String[] ORDERSTATE6 = {"6","不合格"};//  不合格
	public static String getoOrderStateStr(Integer state){
		if(state == null){return "";}
		if(state.intValue() == Integer.valueOf(ORDERSTATE_1[0])){return ORDERSTATE_1[1];}
		if(state.intValue() == Integer.valueOf(ORDERSTATE0[0])){return ORDERSTATE0[1];}
		if(state.intValue() == Integer.valueOf(ORDERSTATE1[0])){return ORDERSTATE1[1];}
		if(state.intValue() == Integer.valueOf(ORDERSTATE3[0])){return ORDERSTATE3[1];}
		if(state.intValue() == Integer.valueOf(ORDERSTATE4[0])){return ORDERSTATE4[1];}
		if(state.intValue() == Integer.valueOf(ORDERSTATE5[0])){return ORDERSTATE5[1];}
		if(state.intValue() == Integer.valueOf(ORDERSTATE6[0])){return ORDERSTATE6[1];}
		return "";
	}
	public static String getoOrderStateStr(String stateName){
		if(stateName == null){return "";}
		if(stateName.equals(ORDERSTATE_1[1])){return ORDERSTATE_1[0];}
		if(stateName.equals(ORDERSTATE0[1])){return ORDERSTATE0[0];}
		if(stateName.equals(ORDERSTATE1[1])){return ORDERSTATE1[0];}
		if(stateName.equals(ORDERSTATE3[1])){return ORDERSTATE3[0];}
		if(stateName.equals(ORDERSTATE4[1])){return ORDERSTATE4[0];}
		if(stateName.equals(ORDERSTATE5[1])){return ORDERSTATE5[0];}
		if(stateName.equals(ORDERSTATE6[1])){return ORDERSTATE6[0];}
		return "";
	}

	//审批待办状态
	public static final String[] WORKSTATE_1 = {"-1","全部"};
	public static final String[] WORKSTATE1 = {"1","待办"};
	public static final String[] WORKSTATE2 = {"2","已办"};
	public static String getWorkStateStr(Integer state){
		if(state == null){return "";}
		if(state.intValue() == Integer.valueOf(WORKSTATE_1[0])){return WORKSTATE_1[1];}
		if(state.intValue() == Integer.valueOf(WORKSTATE1[0])){return WORKSTATE1[1];}
		if(state.intValue() == Integer.valueOf(WORKSTATE2[0])){return WORKSTATE2[1];}
		return "";
	}
	public static String getWorkStateStr(String stateName){
		if(stateName == null){return "";}
		if(stateName.equals(WORKSTATE_1[1])){return WORKSTATE_1[0];}
		if(stateName.equals(WORKSTATE1[1])){return WORKSTATE1[0];}
		if(stateName.equals(WORKSTATE2[1])){return WORKSTATE2[0];}
		return "";
	}
	//fragment在activity中的位置0开始
    public static final int fragmnet0 = 0;
    public static final int fragmnet1 = 1;
    public static final int fragmnet2 = 2;
	

	//聊天类型
    public static final int TXT = 1;
    public static final int IMAGE = 2;
    public static final int VOICE = 3;
    public static final int VIDEO = 4;
    public static final int FILE = 5;
    public static final int MEDIA = 6;
    
	public static final int ENTERPRISE = 0;// 企业白板
	public static final int SINGLE = 1;// 单聊
	public static final int GROUP = 2;// 群聊
	public static final int ORDERGROUP = 3;// 工单群聊
	public static final int QUALITYGROUP = 4;// 质量群聊
	public static final int SAFETYGROUP = 5;// 安全群聊
	public static final int ORDERNODEGROUP = 6;// 工单节点群聊
	public static final int QUALITYNODEGROUP = 7;// 质量节点群聊
	public static final int SAFETYNODEGROUP = 8;// 安全节点群聊
	public static final int DAILYPOLICYORDER= 9;// 日常巡查执行结果
	public static final int CRMGROUP = 10;// CRM群聊
	public static final int ASKREPORTGROUP = 11;// 请示汇报群聊
	public static final int PROJECTPROGRESS = 12;// 请示汇报群聊
	//聊天发送状态
	public static final int  FAIL = 0; // 发送失败
	public static final int  SUCCESS = 1; // 发送成功
	public static final int  INPROGRESS = 2; // 发送中

	public static int SYS_ISSHOWTIP = 0;//是否扫一扫结果提示内容1是0否
	
	// 保存用户名的SharedPreferences文件名
	public static final String AECLENT_SH = "buildclientSh";
	// 保存在SharedPreferences文件里用户名的Key
	public static final String LOGIN_USER_ID = "userId";
	public static final String LOGIN_USER_SERVERID = "userServerId";
	public static final String LOGIN_ENTERPRISECODE = "enterpriseCode";//企业号
	public static final String LOGIN_USERNAME = "username";
	public static final String LOGIN_NAME = "nameZh";//姓名
	public static final String LOGIN_PASSWORD = "password";
	public static final String LOGIN_NOW_DATE = "nowDate";
	public static final String LOGIN_ICONPATHID = "iconpathId";
	public static final String TIP_UPDATE = "tipUpdate";
	//云中心的属性储存到sharedFerences
	public static final String LOGIN_BCHTTPURL = "bcHttpUrl";//建云宝系统Http URL
	public static final String LOGIN_BCTCPURL = "bcTcpUrl";//建云宝系统TCP URL
	public static final String LOGIN_BCFHTTPURL = "bcfHttpUrl";//建云宝文件系统Http URL
	public static final String LOGIN_ERPHTTPURL = "erpHttpUrl";//ERP系统Http URL
	public static final String LOGIN_ERPROOTURL = "erpRootUrl";//ERP系统根路径
	public static final String LOGIN_ISAUTOPLAYAUDIO = "isAutoPlayAudio";//是否自动播放语音1是0否
	public static final String LOGIN_ISLOCDATA = "isLocData";//是否定位数据产生地1是0否
	public static final String LOGIN_ISBELL = "isBell";//是否消息提示音1是0否
	public static final String LOGIN_ISSHOCK = "isShock";//是否消息震动1是0否
	public static final String LOGIN_ENABLE = "enable";//功能权限
	public static final String PHONENUM = "phoneNum";//手机号
	public static final String CODE = "code";//验证码
	
	public static final String IVMS_SERVER_ADDR = "ivmsserveraddr";//安防平台服务地址
	
	public static final int LOGGING_STATUS = 1;// 登录的状态
	public static final int LOGOUT_STATUS = 0;// 注销的状态

	// Activity跳转相关
	public static final String INTENT_BUNDLE = "intentBundle"; // 跳转Activity所携带bundle的key

	// 默认显示Fragment相关
	public static final int FRAGMENT_MSG = 16;
	public static int FRAGMENT_TYPE = FRAGMENT_MSG;
	// ///////////////////////////////////////////
	//上传图片时是否显示坐标
	public static boolean isShowImgCoor = true;
	public static boolean isShowImgCoorLayer = true;//动态值,每次操作需赋值
	// ///////////////////////////////////////////
	// 和个人中心相关
	public static final String PER_SET_NOCATION = "perSetNocation";
	// ///////////////////////////////////////////

}
